package com.jungle.bfi.service.voucher.impl;

import com.jungle.base.domain.bo.BaseUserBo;
import com.jungle.base.service.AbstractService;
import com.jungle.bfi.domain.bo.VoucherTypeBo;
import com.jungle.bfi.entity.VoucherTypePo;
import com.jungle.bfi.service.voucher.VoucherTypeService;
import org.n3r.idworker.Sid;
import org.springframework.stereotype.Service;

/**
 * [voucher]凭证类型(凭证字)
 * @author jungle
 * @since 2025-02-20 08:54:27
 */
@Service
public class VoucherTypeServiceImpl extends AbstractService<VoucherTypePo, VoucherTypeBo, String> implements VoucherTypeService {

    @Override
    protected String getBoId(VoucherTypeBo bo) {
        return bo.getId();
    }

    @Override
    protected String newPoId() {
        return Sid.nextShort();
    }

    @Override
    protected VoucherTypePo createPo(VoucherTypeBo bo, BaseUserBo userBo) {
        return mapper.map(bo, VoucherTypePo.class);
    }
}
